//
//  NetworkTools.h
//  01-BuDeJie
////
//  Created by beisheng03 on 16/11/3.
//  Copyright © 2016年 xiaomage. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

typedef NS_ENUM(NSUInteger, HTTP_REQUEST_METHOD) {
    GET_METHOD = 0,
    POST_METHOD,
    HEAD_METHOD,
    PUT_METHOD,
    PATCH_METHOD,
    DELETE_METHOD,
};


typedef void(^completionHandler)(id responseObject,NSError *error);

@interface NetworkTools : AFHTTPSessionManager

+ (instancetype)shareNetworkTools;

//普通请求
- (NSURLSessionDataTask *)sendRequestWithHttpMethod:(HTTP_REQUEST_METHOD)method URLPath:(NSString *)pathStr parameters:(id)parameters completionHandler:(completionHandler)completionHandler;

- (BOOL)isPhoneNumber:(NSString *)str;
- (BOOL)isCaptcha:(NSString *)str;
- (BOOL)isEmailAdress:(NSString *)str;
- (BOOL)deptNumInputShouldNumber:(NSString *)str;
- (BOOL)isHuHao:(NSString *)str;
- (BOOL)isBillNumber:(NSString *)str;
@end
